/* 导入字体 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* 全局样式 */
.user-dropdown {
  display: none;
  position: absolute;
  top: 65px;
  right: 0;
  background: linear-gradient(145deg, #ffffff, #f0f7ff);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  padding: 18px;
  min-width: 240px;
  z-index: 1000; /* 确保足够高 */
  transform-origin: top right;
  transition: all 0.3s ease;
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
  border: 1px solid #e0e7ff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: #333;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.glass-header {
  position: fixed;
  top: 0;
  left: -80px;
  width: 100%;
  z-index: 100;
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.glass-header.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 0;
  gap: 25px; /* 进一步减小间距 */
}

#logo {
  margin-right: 20px; /* 减小logo右侧间距 */
}

#logo img {
  transition: transform 0.3s ease;
}

.nav-bar .nav {
  display: flex;
  list-style: none;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.nav-bar .nav li {
  position: relative;
}

.nav-bar .nav li a {
  color: #333;
  font-size: 16px;
  padding: 0.5px 5px;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-bar .nav li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -1px;
  left: 0;
  background-color: #007bff;
  transition: width 0.3s ease;
}

.nav-bar .nav li a:hover::after,
.nav-bar .nav .current a::after {
  width: 100%;
}

.nav-bar .nav .current a {
  color: #007bff;
}

.header-right {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 20px;
}

.search-box {
  margin-right: 150px;
  height: 40px;
  margin-top: 5px !important;
  display: flex;
  align-items: center;
  border: 1px solid #66b1ff;
  border-radius: 4px;
  width: 300px;
  /*overflow: hidden; !* 防止圆角缝隙 *!*/
}

.search-box input {
  flex-grow: 1;
  height: 100%;
  border: none;
  outline: none;
  padding: 0 10px;
  font-size: 14px;
  box-sizing: border-box;
  border-radius: 4px 0 0 4px;
  background-color: white;
}

.search-box button {
  width: 50px;
  height: 100%;
  background-color: #66b1ff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 4px 4px 0;
  box-sizing: border-box;
}
.search-box button span {
  color: white;
  font-size: 16px;
  user-select: none;
}

.auth-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-login, .btn-register {
  display: inline-block;
  padding: 8px 5px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 16px;
}

.user-menu {
  position: relative;
}

.avatar-container {
  position: relative;
  cursor: pointer;
}

.avatar {
  width: 48px; /* 增大头像尺寸 */
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.avatar:hover {
  transform: scale(1.08);
  box-shadow: 0 5px 15px rgba(0, 123, 255, 0.2);
  border: 2px solid rgba(0, 123, 255, 0.6);
}

.online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 14px;
  height: 14px;
  background-color: #3db922;
  border-radius: 50%;
  border: 2px solid white;
}

.user-dropdown {
  display: none;
  position: absolute;
  top: 65px; /* 调整下拉框位置 */
  right: 0;
  background: linear-gradient(145deg, #ffffff, #f0f7ff);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  padding: 18px;
  min-width: 240px;
  z-index: 100;
  transform-origin: top right;
  transition: all 0.3s ease;
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
  border: 1px solid #e0e7ff;
}

.user-dropdown.show {
  display: block;
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e7ff;
}

.dropdown-avatar {
  width: 56px; /* 增大下拉框内头像尺寸 */
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.username {
  font-weight: 600;
  color: #212529;
  margin-bottom: 2px;
  font-size: 15px;
}

.user-role {
  font-size: 13px;
  color: #6c757d;
}

.divider {
  height: 1px;
  background-color: #e0e7ff;
  margin: 10px 0;
}

.user-dropdown ul li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: #333;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: 14px;
}

.user-dropdown ul li a:hover {
  background-color: #e6f0ff;
  color: #007bff;
  transform: translateX(5px);
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.user-dropdown ul li a.logout {
  color: #e74c3c;
}

.user-dropdown ul li a.logout:hover {
  background-color: #feeef0;
  transform: translateX(5px);
}

/* 新增：调整banner尺寸 */
.banner {
  height: 450px; /* 增大banner高度 */
  width: 100%;
  overflow: hidden;
  position: relative;
  margin-top: 80px; /* 确保不被导航栏遮挡 */
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.footer {
  background-color: #2a2d35;
  color: #b0b0b0;
  padding: 60px 0 30px 0;
  margin-top: 80px;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo img {
  margin-bottom: 15px;
}

.footer-logo p {
  max-width: 220px;
  font-size: 14px;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  justify-content: space-around;
}

.footer-links div {
  min-width: 120px;
}

.footer-links h4 {
  color: white;
  font-size: 16px;
  margin-bottom: 15px;
  font-weight: 500;
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links ul li {
  margin-bottom: 10px;
}

.footer-links ul li a {
  color: #b0b0b0;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-links ul li a:hover {
  color: white;
}

.footer-contact h4 {
  color: white;
  font-size: 16px;
  margin-bottom: 15px;
  font-weight: 500;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background-color: #007bff;
  transform: translateY(-2px);
}

.contact-info {
  font-size: 14px;
  margin-bottom: 8px;
}

.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  font-size: 13px;
}

.certifications {
  display: flex;
  gap: 15px;
}

.certifications img {
  height: 24px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.certifications img:hover {
  opacity: 1;
}
